package com.demo.rabbitmq.config;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * 消息发送回调
 */

public class MsgSendReturnConfirmCallBack implements RabbitTemplate.ReturnCallback {

    @Override
    public void returnedMessage(Message message, int i, String s, String s1, String s2) {
        String msg = new String(message.getBody());
        System.out.println("returnedMessage:" + msg);
    }
}
